//==========================================================================
// Copyright (c) 2000-2008,  Elastos, Inc.  All Rights Reserved.
//==========================================================================
#ifndef __RENDERLIB_DEF_H__
#define __RENDERLIB_DEF_H__

#include <elatypes.h>
using namespace Elastos;

//struct IMAGE
//{
//    UInt8*       pData;
//    Int32        nWidth;
//    Int32        nHeight;
//    Int32        nPitch;
//    Int32        nImageType;
//};

struct _GRADFILL
{
    UInt8* pDst;
    Int32 nPitch;
    Int32 incx_16;
    Int32 incy_16;
    Int32 x0;
    Int32 y0;
    Int32* gradientTable;
    Int32 width;
};

struct ScanLineList {
    Point Left;
    Point Right;
};

struct _POLYFILL
{
    UInt8* pSrc;
    UInt8* pDst;
    Int32 nSrcPitch;
    Int32 nDstPitch;
    Int32 startY;
    Int32 height;
    ScanLineList * scanlinelist;
};

struct _AALINEINFO
{
    UInt8* pDst;
    Int32 nPitch;
    Int32 startP;
    Int32 deltaD;
    Int32 s16;
    Int32 d16;
    Int32 inc;
    Int32 color;
};

struct _AAEDGEINFO : public _AALINEINFO
{
    UInt8* pSrc;
    ScanLineList* scanlinelist;
    Int32 startY;
};

struct _WARPPERSP
{
    Pixel* pSrc;
    Pixel* pDst;
    UInt32 Src_Pitch;
    UInt32 Dst_Pitch;
    UInt32 SrcH;
    UInt32 DstW;
    UInt32 DstHL;
    UInt32 DstHR;
    UInt32 DstHD16;
    UInt32 SrcXD16;
    UInt32 SrcYD16;
};

struct _WARPPERSPH
{
    Pixel* pSrc;
    Pixel* pDst;
    UInt32 Src_Pitch;
    UInt32 Dst_Pitch;
    UInt32 SrcW;
    UInt32 DstH;
    UInt32 DstWT;
    UInt32 DstWD;
    UInt32 DstWD16;
    UInt32 SrcXD16;
    UInt32 SrcYD16;

};

struct _CURVE
{
    Pixel* pSrc;
    Pixel* pDst;
    UInt32 Src_Pitch;
    UInt32 Dst_Pitch;
    UInt32 SrcW;
    UInt32 SrcH;
    UInt32 DstW;
    UInt32 SrcXD16;
    UInt32 DstH;
    UInt32 SrcYD16;
    UInt32 Dst_SX16;
    Int32* aSampleX16;
    UInt32 InnerWidth;
};

struct _SHEAR
{
    Pixel* pSrc;
    Pixel* pDst;
    UInt32 Src_Pitch;
    UInt32 Dst_Pitch;
    UInt32 SrcW;
    UInt32 SrcH;
    UInt32 DstW;
    UInt32 DstH;
    UInt32 SrcXD16;
    UInt32 SrcYD16;
    UInt32 DstSX16;
    UInt32 Dst_SX16;
    UInt32 offset;
};





#endif  //__RENDERLIB_DEF_H__

